#ifndef __TCPSERVER_HPP__
#define __TCPSERVER_HPP__

#include "Acceptor.hpp"
#include "EventLoop.hpp"

namespace wd{

class TcpServer{
public:
    TcpServer(int port, string ip);
    void start();
    void stop();
    void setAllCallbacks(CallBack _onNewconn,
                         CallBack _onMessage,
                         CallBack _onClose);

private:
    Acceptor _accptor;
    EventLoop _eventloop;


};




}


#endif // __TCPSERVER_HPP__

